package com.liangfeng.breezebrowser.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by mozhifeng on 2017/5/24.
 */

public  abstract class BaseActivity extends AppCompatActivity {
    private int layout;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayout());
        initView();
        initListener();
        initData();
    }

    @Override
    protected void onDestroy() {

    }

    /**
     * 初始化网络数据
     */
    public abstract void initData();

    /**
     * 初始化监听器
     */
    public abstract void initListener() ;

    /**
     * 初始化视图
     */
    public abstract void initView() ;

    /**
     * 获取布局
     * @return
     */
    public abstract int getLayout();
}
